package com.mobile.collect.db;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.mobile.collect.beans.ExportPicInfo;
import com.mobile.collect.beans.DeviceInfo;
import com.mobile.collect.beans.ExportResultInfo;
import com.mobile.collect.beans.ExportInfo;
import com.mobile.collect.beans.DevicePicInfo;
import com.mobile.collect.beans.TypeInfo;
import com.mobile.collect.beans.DevicePointInfo;

import com.mobile.collect.db.ExportPicInfoDao;
import com.mobile.collect.db.DeviceInfoDao;
import com.mobile.collect.db.ExportResultInfoDao;
import com.mobile.collect.db.ExportInfoDao;
import com.mobile.collect.db.DevicePicInfoDao;
import com.mobile.collect.db.TypeInfoDao;
import com.mobile.collect.db.DevicePointInfoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig exportPicInfoDaoConfig;
    private final DaoConfig deviceInfoDaoConfig;
    private final DaoConfig exportResultInfoDaoConfig;
    private final DaoConfig exportInfoDaoConfig;
    private final DaoConfig devicePicInfoDaoConfig;
    private final DaoConfig typeInfoDaoConfig;
    private final DaoConfig devicePointInfoDaoConfig;

    private final ExportPicInfoDao exportPicInfoDao;
    private final DeviceInfoDao deviceInfoDao;
    private final ExportResultInfoDao exportResultInfoDao;
    private final ExportInfoDao exportInfoDao;
    private final DevicePicInfoDao devicePicInfoDao;
    private final TypeInfoDao typeInfoDao;
    private final DevicePointInfoDao devicePointInfoDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        exportPicInfoDaoConfig = daoConfigMap.get(ExportPicInfoDao.class).clone();
        exportPicInfoDaoConfig.initIdentityScope(type);

        deviceInfoDaoConfig = daoConfigMap.get(DeviceInfoDao.class).clone();
        deviceInfoDaoConfig.initIdentityScope(type);

        exportResultInfoDaoConfig = daoConfigMap.get(ExportResultInfoDao.class).clone();
        exportResultInfoDaoConfig.initIdentityScope(type);

        exportInfoDaoConfig = daoConfigMap.get(ExportInfoDao.class).clone();
        exportInfoDaoConfig.initIdentityScope(type);

        devicePicInfoDaoConfig = daoConfigMap.get(DevicePicInfoDao.class).clone();
        devicePicInfoDaoConfig.initIdentityScope(type);

        typeInfoDaoConfig = daoConfigMap.get(TypeInfoDao.class).clone();
        typeInfoDaoConfig.initIdentityScope(type);

        devicePointInfoDaoConfig = daoConfigMap.get(DevicePointInfoDao.class).clone();
        devicePointInfoDaoConfig.initIdentityScope(type);

        exportPicInfoDao = new ExportPicInfoDao(exportPicInfoDaoConfig, this);
        deviceInfoDao = new DeviceInfoDao(deviceInfoDaoConfig, this);
        exportResultInfoDao = new ExportResultInfoDao(exportResultInfoDaoConfig, this);
        exportInfoDao = new ExportInfoDao(exportInfoDaoConfig, this);
        devicePicInfoDao = new DevicePicInfoDao(devicePicInfoDaoConfig, this);
        typeInfoDao = new TypeInfoDao(typeInfoDaoConfig, this);
        devicePointInfoDao = new DevicePointInfoDao(devicePointInfoDaoConfig, this);

        registerDao(ExportPicInfo.class, exportPicInfoDao);
        registerDao(DeviceInfo.class, deviceInfoDao);
        registerDao(ExportResultInfo.class, exportResultInfoDao);
        registerDao(ExportInfo.class, exportInfoDao);
        registerDao(DevicePicInfo.class, devicePicInfoDao);
        registerDao(TypeInfo.class, typeInfoDao);
        registerDao(DevicePointInfo.class, devicePointInfoDao);
    }
    
    public void clear() {
        exportPicInfoDaoConfig.clearIdentityScope();
        deviceInfoDaoConfig.clearIdentityScope();
        exportResultInfoDaoConfig.clearIdentityScope();
        exportInfoDaoConfig.clearIdentityScope();
        devicePicInfoDaoConfig.clearIdentityScope();
        typeInfoDaoConfig.clearIdentityScope();
        devicePointInfoDaoConfig.clearIdentityScope();
    }

    public ExportPicInfoDao getExportPicInfoDao() {
        return exportPicInfoDao;
    }

    public DeviceInfoDao getDeviceInfoDao() {
        return deviceInfoDao;
    }

    public ExportResultInfoDao getExportResultInfoDao() {
        return exportResultInfoDao;
    }

    public ExportInfoDao getExportInfoDao() {
        return exportInfoDao;
    }

    public DevicePicInfoDao getDevicePicInfoDao() {
        return devicePicInfoDao;
    }

    public TypeInfoDao getTypeInfoDao() {
        return typeInfoDao;
    }

    public DevicePointInfoDao getDevicePointInfoDao() {
        return devicePointInfoDao;
    }

}
